package com.wn.sms.controller;

import com.wn.common.result.Result;
import com.wn.sms.service.SmsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api(tags = "短信发送")
@RestController
@RequestMapping("/sms")
@CrossOrigin
public class SmsController {
    @Autowired
    private SmsService smsService;

    @ApiOperation(value = "短信发送")
    @GetMapping("/send")
    public Result sendSmsPhone(@RequestParam String phone){
        smsService.sendPhoneMessage(phone);
        return Result.ok();
    }
}